package com.puman.watchtrade.fragment.personal;

import java.util.ArrayList;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.os.Handler;
import android.os.Handler.Callback;
import android.os.Message;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;

import com.ab.view.AbPlayView;
import com.puman.watchtrade.MainActivity;
import com.puman.watchtrade.R;
import com.puman.watchtrade.fragment.info.InfoDetailFragment;
import com.puman.watchtrade.fragment.info.adpter.ImgAdapter;
import com.puman.watchtrade.fragment.info.adpter.InfoListViewAdapter;
import com.puman.watchtrade.fragment.info.adpter.MyGallery;
import com.puman.watchtrade.fragment.info.httpHandler.InfoHttpHandler;
import com.puman.watchtrade.fragment.info.model.InfoDatas;
import com.puman.watchtrade.fragment.personal.adapter.SystemMsgListViewAdapter;
import com.puman.watchtrade.fragment.personal.handler.PersonalHttpHandler;
import com.puman.watchtrade.fragment.personal.model.SystemMsgs;
import com.puman.watchtrade.util.DataResult;
import com.puman.watchtrade.util.Gjfun;
import com.puman.watchtrade.util.LoadingProgressDialog;
import com.puman.watchtrade.util.PullDownListView;

/*
 */
@SuppressLint({ "ValidFragment", "NewApi" })
public class MsgDetailFregment extends Fragment implements OnClickListener{
	private View mView;

	/*
	 * init UI
	 */
	private TextView toptitle;
	private TextView msgDetail;
	/*
	 * init variable
	 */
	private LayoutInflater inflater;
	/**
	 * 存储上一个选择项的Index
	 */
	private int preSelImgIndex = 0;
	private String title = "";
	private String msg = "";

	public MsgDetailFregment(String msg) {
		if (title.length() > 6) {
			this.title = title.substring(0, 6);
		}else {
			this.title = title;
		}
		this.msg = msg;
	}


	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		mView = inflater.inflate(R.layout.msg_detail_layout, container, false);
		this.inflater = inflater;
		initView();
		return mView;
	}

	private void initView() {
		toptitle = (TextView) mView.findViewById(R.id.top_title);
		toptitle.setText("系统消息");
		mView.findViewById(R.id.main_left_imgbtn).setOnClickListener(this);
		
		msgDetail = (TextView) mView.findViewById(R.id.system_msg);
		
		msgDetail.setText(msg);

		
	}


	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.main_left_imgbtn:
			MainActivity.getInstant().fragmentManager.popBackStack();
			break;

		default:
			break;
		}
		
	}



}
